<%--
  Created by IntelliJ IDEA.
  User: 雷神
  Date: 2021/4/21
  Time: 17:26
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html>
<html>

<head>
    <base href="<%=basePath%>"/>
    <title>襄阳蓝芯智能化办公系统</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" type="text/css" href="view/bootstrap-3.3.5/css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="view/bootstrapvalidator/css/bootstrapValidator.css" />
    <script charset="utf-8" src="view/jquery/jquery-1.10.2.min.js"></script>
    <script charset="utf-8" src="view/bootstrap-3.3.5/js/bootstrap.js"></script>
    <script charset="utf-8" src="view/bootstrapvalidator/js/bootstrapValidator.js"></script>
</head>
<body>
<div class="container col-sm-12">
    <%-- 标题--%>
    <div class="panel-heading">
        <h2>资产移动列表</h2>
        申请日期：<input type="date" name="startDate">
        <input type="date" name="endDate">
        单据状态：<select name="status">
        <option>~请选择状态~</option>
        <option value="0">~待提交~</option>
        <option value="1">~未通过~</option>
        <option value="2">~已通过~</option>
        <option value="3">~待查阅~</option>

    </select>
        <input type="submit" value="搜索">
    </div>

    <div id="alertmsg" class="alert alert-danger" style="text-align: center;" hidden="true"></div>

    <div class="panel-body">
        <table width="900px">
            <tr>
                <th>申请单号</th>
                <th>审批流程</th>
                <th>创建人</th>
                <th>申请日期</th>
                <th>所属部门</th>
                <th>单据状态</th>
            </tr>
            <c:forEach items="${list}" var="yd">
                <tr>
                    <td><input type="hidden" id="oid" value="${yd.oid}">
<%--                        <button class="btn btn-link but" data-toggle="modal" data-target="#myModalmx">${yd.docNo}</button>--%>
                        <a href="zcydall/selectxq?oid=${yd.oid}">${yd.docNo}</a>
                    </td>
                    <td>${yd.lcid.flowName}</td>
                    <td>${yd.empcj.empName}</td>
                    <td>${yd.createDate}</td>
                    <td>${yd.dept.deptName}</td>
                    <td>
                        <c:if test="${yd.status=='0'}">
                            待提交
                        </c:if>
                        <c:if test="${yd.status=='1'}">
                            未通过
                        </c:if>
                        <c:if test="${yd.status=='2'}">
                            已通过
                        </c:if>
                        <c:if test="${yd.status=='3'}">
                            待查阅
                        </c:if>
                        <c:if test="${yd.status=='4'}">
                            已办理移动
                        </c:if>
                    </td>
                </tr>
            </c:forEach>
        </table>
    </div>
        </form>
    </div>


<!-- 移动申请详情页面 -->

<div class="modal fade" id="myModalmx" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"
                        aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">资产移动详情页面</h4>
            </div>

            <div class="modal-body" id="bxxqdiv">
                <table class="table table-hover" id="myTable">

                    <tbody>
                    <tr>
                        <td colspan="4" class="success">资产移动查看</td>
                    </tr>
                    <tr>
                        <td>移动单号</td>
                        <td id="docNo"></td>
                        <td>单据类型</td>
                        <td id="doctype"></td>
                    </tr>
                    <tr>
                        <td>审批流程</td>
                        <td id="flowid"></td>
                        <td>移动原因</td>
                        <td id="moveReason"></td>
                    </tr>
                    <tr>
                        <td>移动时间</td>
                        <td id="moveDate"></td>
                        <td>备注</td>
                        <td id="remark"></td>
                    </tr>
                    <tr>

                        <td>创建人</td>
                        <td id="creator"></td>
                        <td>申请人</td>
                        <td id="proposer"></td>
                    </tr>
                    <tr>
                        <td>申请人部门</td>
                        <td id="deptid"></td>
                        <td>创建日期</td>
                        <td id="cj"></td>
                    </tr>
                    <tr>
                        <td>创建日期</td>
                        <td id="createDate"></td>
                        <td>提交日期</td>
                        <td id="submitDate"></td>
                    </tr>
                    <tr>
                        <td>状态</td>
                        <td id="status"></td>
                    </tr>
                    <tr>
                        <td colspan="4" class="success">移动明细</td>
                    </tr>
                    <tr>
                        <td colspan="4">
                            <table id="tab1" class="table table-hover">
                                <thead>
                                <tr>
                                    <th class="success">资产名称</th>
                                    <th class="success">原地</th>
                                    <th class="success">原保管员</th>
                                    <th class="success">移动目的地</th>
                                    <th class="success">移动时间</th>
                                    <th class="success">备注</th>
                                </tr>
                                </thead>
                            </table>
                        </td>
                    </tr>
                    </tbody>

                </table>
            </div>
            <div class="modal-footel">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>
</body>
<script type="text/javascript">
    $(function() {
        $(".but").click(function () {

            $.post("zcydall/selectxq", {oid: $("#oid").val()}, function (msg) {
                console.log(msg)

            });
        });
    })




</script>
</html>

